From: Marco Trevisan (TreviƱo) Date: Fri, 9 Aug 2019 00:58:28 +0000 (+0200) Subject: environment: Don't use actor if an ease callback destroys it X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~839^2^2~4 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=826ac957262167d01996ea26caf77f122bff8545;p=gnome-shell.git environment: Don't use actor if an ease callback destroys it An actor ease callback could destroy the actor, in such case we should do not touch the actor anymore. So, before calling the callback, reset restore the easing state and don't perform any further action with it. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1507 --- diff --git a/js/ui/environment.js b/js/ui/environment.js index 60d73d9cc..0c291b0a2 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -117,6 +117,7 @@ function _easeActor(actor, params) { animatedProps.forEach(p => actor.remove_transition(p)); actor.set(params); + actor.restore_easing_state(); if (callback) { let transition = actor.get_transition(animatedProps[0]); @@ -126,8 +127,6 @@ function _easeActor(actor, params) { else callback(true); } - - actor.restore_easing_state(); } function _easeActorProperty(actor, propName, target, params) {